package br.com.intelsys.iflow.driver.struts;

import java.util.ArrayList;
import java.util.List;

class CfgIFlowStruts {
	private List <CfgProcess> cfgProcessList;
	
	void setCfgProcessList(List<CfgProcess> cfgProcessList) {
		this.cfgProcessList = cfgProcessList;
	}
	void addProcess(CfgProcess process) {
		if (this.cfgProcessList == null) {
			this.cfgProcessList = new ArrayList <CfgProcess> ();
		}
		this.cfgProcessList.add(process);
	}
	List<CfgProcess> getCfgProcessList() {
		return cfgProcessList;
	}
	CfgProcess getCfgProcess(String processName) {
		CfgProcess cfgPr = null;
		for (CfgProcess p : this.cfgProcessList) {
			if (p.getName().equals(processName)) {
				cfgPr = p;
				break;
			}
		}
		return (cfgPr);
	}
	

}
